package com.bootdo.system.domain;

import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 
 * 
 * @author chglee
 * @email 1992lcg@163.com
 * @date 2021-02-04 11:46:52
 */
public class BizhongDO implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//币种id
	private Integer id;
	//币种名称
	private String bizhongname;
	//当前价格
	private BigDecimal nowprice;
	//涨幅
	private BigDecimal zhangfu;
	//备注
	private String beizhu;

	/**
	 * 设置：币种id
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：币种id
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：币种名称
	 */
	public void setBizhongname(String bizhongname) {
		this.bizhongname = bizhongname;
	}
	/**
	 * 获取：币种名称
	 */
	public String getBizhongname() {
		return bizhongname;
	}
	/**
	 * 设置：当前价格
	 */
	public void setNowprice(BigDecimal nowprice) {
		this.nowprice = nowprice;
	}
	/**
	 * 获取：当前价格
	 */
	public BigDecimal getNowprice() {
		return nowprice;
	}
	/**
	 * 设置：涨幅
	 */
	public void setZhangfu(BigDecimal zhangfu) {
		this.zhangfu = zhangfu;
	}
	/**
	 * 获取：涨幅
	 */
	public BigDecimal getZhangfu() {
		return zhangfu;
	}
	/**
	 * 设置：备注
	 */
	public void setBeizhu(String beizhu) {
		this.beizhu = beizhu;
	}
	/**
	 * 获取：备注
	 */
	public String getBeizhu() {
		return beizhu;
	}


	public String getUpname(){
		final int indexOf = bizhongname.indexOf("usdt");
		if(indexOf>=0){
			String lowname = bizhongname.substring(0, indexOf) + "/usdt";
			String upperCase = lowname.toUpperCase();

			return upperCase;
		}
		if(bizhongname!=null){
			return bizhongname.toUpperCase();
		}

		return bizhongname;
	}

	public String getnowpricevo(){

		return nowprice.stripTrailingZeros().toPlainString();
	}

	public String getzhangfuvo(){

		return zhangfu.stripTrailingZeros().toPlainString();
	}
}
